package com.itlv.recursion.business.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 菜单表
 *
 * @author Lv
 * @date 2022/10/22
 */
@Data
@TableName(value = "menu")
public class Menu implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 菜单名称
     */
    @TableField(value = "menu_name")
    private String menuName;

    /**
     * 父级菜单id
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 逻辑删除标识符（0未删除 1已删除）
     */
    @TableLogic
    @TableField(value = "deleted")
    private Integer deleted;

    /**
     * 添加人
     */
    @TableField(value = "add_by")
    private String addBy;

    /**
     * 添加时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 修改时间
     */
    @TableField(value = "add_time")
    private Date addTime;

    /**
     * 子集菜单
     */
    @TableField(exist = false)
    private List<Menu> childList = new ArrayList<>();

    private static final long serialVersionUID = 1L;
}